<%= form_for @user, url: sufia.profile_path(@user.to_param), html: {multipart: true, class: 'form-horizontal' } do |f| %>
  <div class="form-group">
    <%= f.label :avatar, '<i class="glyphicon glyphicon-camera"></i> Change picture'.html_safe, class: "col-xs-4 control-label" %>
    <div class="col-xs-8">
      <%= image_tag @user.avatar.url(:thumb) if @user.avatar? %>
      <%= f.file_field :avatar %>
      <%= f.hidden_field :avatar_cache %>
      <span class="help-block">JPG, GIF, or PNG (less than 2MB)</span>

      <div class="checkbox">
        <%= f.label :remove_avatar do %>
          <%= f.check_box :remove_avatar %>
          Delete picture
          <a href="#" id="delete_picture_help" data-toggle="popover" data-content="If you would like to remove your picture entirely, check the box and save your profile." data-original-title="Delete Picture"><i class="glyphicon glyphicon-question-sign"></i></a>
        <% end %>
      </div>
      <div class="checkbox">
        <%= f.label :update_directory do %>
          <%= f.check_box :update_directory %>
          Refresh directory info
          <a href="#" id="refresh_directory_help" data-toggle="popover" data-content="The information displayed in your profile comes from <%=institution_name %>'s central directory (LDAP) and is cached by <%=application_name %>.  If you have updated that information and don't see those changes in your <%=application_name %> profile, check the box and save your profile." data-original-title="Refresh Directory Info"><i class="glyphicon glyphicon-question-sign"></i></a>
        <% end %>
      </div>
    </div>
  </div><!-- .form-group -->

  <% if Sufia.config.arkivo_api %>
    <%= render partial: 'zotero', locals: { f: f, user: @user } %>
  <% end %>

  <div class="form-group">
    <%= f.label :orcid, class: 'col-xs-4 control-label' do %>
      <%= orcid_label %>
    <% end %>
    <div class="col-xs-8">
       <%= f.text_field :orcid, class: "form-control" %>
    </div>
  </div><!-- .form-group -->

  <div class="form-group">
    <%= f.label :twitter_handle, '<i class="fa fa-twitter"></i> Twitter Handle'.html_safe, class: 'col-xs-4 control-label' %>
    <div class="col-xs-8">
       <%= f.text_field :twitter_handle, class: "form-control" %>
    </div>
  </div><!-- .form-group -->

  <div class="form-group">
    <%= f.label :facebook_handle, '<i class="fa fa-facebook"></i> Facebook Handle'.html_safe, class: 'col-xs-4 control-label' %>
    <div class="col-xs-8">
       <%= f.text_field :facebook_handle, class: "form-control" %>
    </div>
  </div><!-- .form-group -->

  <div class="form-group">
    <%= f.label :googleplus_handle, '<i class="fa fa-google-plus"></i> Google+ Handle'.html_safe, class: 'col-xs-4 control-label' %>
    <div class="col-xs-8">
       <%= f.text_field :googleplus_handle, class: "form-control" %>
    </div>
  </div><!-- .form-group -->

  <%= render 'trophy_edit', trophies: @trophies %>

  <%= f.button '<i class="glyphicon glyphicon-save"></i> Save Profile'.html_safe, type: 'submit', class: "btn btn-primary" %>
<% end %>
<%= render 'dashboard/_index_partials/proxy_rights', user: @user %>
